Book Contents

Tags in expressions

An analog or digital tag can stand alone as an expression or be included as part of an expression that is made up of other components as well, such as constants, operators, functions, and If-Then-Else logic. An expression that is simply a tag name returns the current value of the tag.

You can use string tags as operands with the plus (+) arithmetic operator and with relational operators.

When using a tag in an expression you can

  • Click the Tags button to display the tag list, highlight a tag to select it, then click OK to enter the tag in the expression.
  • Type a tag name that is not yet defined in the tag database, finish entering the expression and click OK, then define the tag if you want to.
  • Enter a tag name by either of the above methods, then double-click it to update or enter the tag’s definition.

When you use a tag name that contains dashes (-) or starts with a number, you must enclose it in curly brackets in the expressions to distinguish the tag name from other elements in the expression.

Example: tag1 == tag2 + {tag-3}

See also

About expressions

String tags in expressions

Quick reference to math functions

Quick reference to security functions

Quick reference to operators

Constants in expressions

If-Then-Else logic